﻿<%@ Page Language="C#" AutoEventWireup="true" Title="" %>

<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>


<script runat="server" language="C#">
    wlFrame.FileUpLoadCommon fc = new wlFrame.FileUpLoadCommon();
    string err = "";

</script>

<%
    if (U_FileUrl.FileName != "")
    {
        fc.PromteExt = "doc,docx,xls,ppt,pptx,txt,pdf,jpg,bmp,png";
        fc.MaxSize = int.MaxValue;
        if (fc.SaveFile(U_FileUrl.PostedFile, false))
        {
            string filename = "/public/" + fc.newFileName.Substring(0, 8) + "/" + fc.newFileName;
          
            
%>

<script type="text/javascript">
    parent.document.getElementById("fgUrl").value = "<%=filename %>"; //fgUrl
</script>

<%
    }else
        {
%>

<script language="javascript">
    alert("<%=fc.errorMsg %>");
</script>

<%

        }
    }
%>
<body margin="0">
    <table width="150px" height="25px">
        <form id="Form1" runat="server">
        <tr id="TopTr">
            <td class="table_none"  align="left" nowrap>
                <asp:FileUpload ID="U_FileUrl" runat="server" contentEditable="false" CssClass="text_input"
                    Style="width: 60px" />&nbsp;&nbsp;
                <input type="submit" value="上传">
            </td>
        </tr>
        </form>
    </table>
</body>
<!-- window.top.adaptIFrameHeight(parseInt(window.location.hash.substring(1),10)); -->
